Method and apparatus for selecting accessory in virtual environment, device, and readable storage medium

ABSTRACT

This application discloses a method and apparatus for selecting an accessory in a virtual environment. The method includes: displaying a first virtual environment interface; receiving a trigger operation on an accessory switching control; displaying a candidate accessory zone in a local peripheral region of the accessory switching control according to the trigger operation; receiving a selection operation on a target gun accessory in n gun accessories; and displaying a second virtual environment interface according to the selection operation. The accessory switching control is displayed superimposed on a picture. When the trigger operation on the accessory switching control is received, the candidate accessory zone is displayed in the peripheral region of the accessory switching control, and the n gun accessories of the same accessory type are displayed in the candidate accessory zone.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. patentapplication Ser. No. 17/017,538, entitled “METHOD AND APPARATUS FORSELECTING ACCESSORY IN VIRTUAL ENVIRONMENT, DEVICE, AND READABLE STORAGEMEDIUM”, filed on Sep. 10, 2020, which application is a continuation ofPCT Patent Application No. PCT/CN2019/098017, entitled “METHOD ANDAPPARATUS FOR SELECTING ACCESSORY IN VIRTUAL ENVIRONMENT, AND DEVICE ANDREADABLE STORAGE MEDIUM”, filed on Jul. 26, 2019, which claims priorityto Chinese Patent Application No. 201810899065.2, entitled “METHOD FORSELECTING ACCESSORY IN VIRTUAL ENVIRONMENT, DEVICE, AND STORAGE MEDIUM”filed on Aug. 8, 2018, all of which are incorporated by reference intheir entirety.

FIELD OF THE TECHNOLOGY

Embodiments of this application relate to the field of virtualenvironments, and in particular, to a method and apparatus for selectingan accessory in a virtual environment, a device, and a readable storagemedium.

BACKGROUND OF THE DISCLOSURE

In an application program based on a virtual environment, for example, avirtual reality (VR) application program, a third-person shooting (TPS)game, a first-person shooting (FPS) game, and a multiplayer onlinebattle arena (MOBA) game, a user may control a virtual object to use avirtual gun to shoot a virtual item or another virtual object in thevirtual environment.

Generally, the virtual gun includes some slots for fitting different gunaccessories. For example, an M416 automatic rifle is usually providedwith a muzzle slot, a grip slot, a cartridge slot, a buttstock slot, anda scope slot. The scope slot may be fitted with any one of a red dotscope, a holographic scope, a 2× scope, a 4× scope, and an 8× scope.Moreover, the scope slot may include a primary slot and a secondaryslot. A player observes the virtual environment according to a scopefitted in the primary slot of the virtual gun, or may switch a scope inthe secondary slot to the primary slot by using a switching control in auser interface (UI) and observe the virtual environment by using theswitched scope.

However, when the scope is switched in the foregoing manner, only thescopes in the primary slot and the secondary slot can be switched witheach other. Since the scopes include basic scopes (such as the red dotscope and the holographic scope), low-magnification scopes (such as the2× scope and a 3× scope), high-magnification scopes (such as the 4×scope and the 8× scope), and the like, the switching manner cannot meeta requirement that a plurality of magnification scopes can be easilyfitted on the virtual gun. When a magnification scope that the userrequires to be fitted is not in the primary slot or the secondary slot,a virtual backpack needs to be opened for fitting. It causes complexsteps and inconvenient operations, resulting in low human-computerinteraction efficiency when the user switches between scopes.

SUMMARY

Embodiments of this application provide a method and apparatus forselecting an accessory in a virtual environment, a device, and areadable storage medium, to resolve a problem of low human-computerinteraction efficiency when a user switches a scope. The technicalsolutions are as follows:

According to one aspect, a method for selecting an accessory in avirtual environment is provided, applied to a terminal, the methodincluding:

displaying a first virtual environment interface, the first virtualenvironment interface including a picture of the virtual environmentobserved by a virtual object and an accessory switching control, and thevirtual object holding a virtual gun in the virtual environment;

receiving a trigger operation on the accessory switching control;

displaying a candidate accessory zone in a local peripheral region ofthe accessory switching control according to the trigger operation, ngun accessories of one accessory type being displayed in the candidateaccessory zone, each gun accessory being an accessory that has beenobtained by the virtual object and that is used for being fitted on thevirtual gun, the gun accessory being fitted in a slot corresponding tothe accessory type on the virtual gun, and n being a positive integer;

receiving a selection operation on a target gun accessory in the n gunaccessories; and

replacing the first virtual environment interface with a second virtualenvironment interface according to the selection operation, the secondvirtual environment interface comprising a picture of the virtualenvironment observed by the virtual object, the virtual object holdingthe virtual gun, and the target gun accessory being fitted in a targetslot of the virtual gun.

According to another aspect, a terminal is provided, including aprocessor and a memory, the memory storing a plurality of programs that,when executed by the processor, cause the terminal to implement themethod for selecting an accessory in a virtual environment according tothe embodiments of this application.

According to another aspect, a non-transitory computer-readable storagemedium is provided, storing a plurality of programs that, when executedby a processor of a terminal, cause the terminal to implement the methodfor selecting an accessory in a virtual environment according to theembodiments of this application.

According to another aspect, a computer program product is provided, thecomputer program product, when run on a computer, causing the computerto perform the method for selecting an accessory in a virtualenvironment according to the embodiments of this application.

The technical solutions provided in the embodiments of this applicationhave at least the following beneficial effects:

The accessory switching control is displayed in the first virtualenvironment interface. When the trigger operation on the accessoryswitching control is received, the candidate accessory zone is displayedin the peripheral region of the accessory switching control, and the ngun accessories of the same accessory type are displayed in thecandidate accessory zone. In this way, a user may select any one of then gun accessories to be fitted in the target slot without opening abackpack to select a to-be-selected accessory. Operation steps in theentire switching process are simple, and the human-computer interactionefficiency is relatively high when the user switches betweenaccessories.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a structural block diagram of an electronic device accordingto an exemplary embodiment of this application.

FIG. 2 is a structural block diagram of a computer system according toan exemplary embodiment of this application.

FIG. 3 is a schematic diagram of a terminal interface in the related artaccording to an exemplary embodiment of this application.

FIG. 4 is a schematic diagram of a terminal interface in the related artaccording to another exemplary embodiment of this application.

FIG. 5 is a flowchart of a method for selecting an accessory in avirtual environment according to an exemplary embodiment of thisapplication.

FIG. 6 is a schematic diagram of a terminal interface according to anexemplary embodiment of this application.

FIG. 7 is a schematic diagram of a terminal interface according toanother exemplary embodiment of this application.

FIG. 8 is a schematic diagram of a terminal interface according toanother exemplary embodiment of this application.

FIG. 9 is a schematic diagram of a terminal interface according toanother exemplary embodiment of this application.

FIG. 10 is a flowchart of a method for selecting an accessory in avirtual environment according to another exemplary embodiment of thisapplication.

FIG. 11 is a schematic diagram of a terminal interface according toanother exemplary embodiment of this application.

FIG. 12 is a schematic diagram of a terminal interface according toanother exemplary embodiment of this application.

FIG. 13 is a flowchart of a method for selecting an accessory in avirtual environment according to another exemplary embodiment of thisapplication.

FIG. 14 is a flowchart of a method for selecting an accessory in avirtual environment according to another exemplary embodiment of thisapplication.

FIG. 15 is a flowchart of a method for selecting an accessory in avirtual environment according to another exemplary embodiment of thisapplication.

FIG. 16 is a structural block diagram of an apparatus for selecting anaccessory in a virtual environment according to an exemplary embodimentof this application.

FIG. 17 is a structural block diagram of an apparatus for selecting anaccessory in a virtual environment according to another exemplaryembodiment of this application.

FIG. 18 is a structural block diagram of a terminal according to anexemplary embodiment of this application.

DESCRIPTION OF EMBODIMENTS

To make the objectives, technical solutions, and advantages of thisapplication clearer, the following further describes the implementationsof this application in detail with reference to the accompanyingdrawings.

First, terms involved in the embodiments of this application are brieflyintroduced:

Virtual environment: It is a virtual environment displayed (or provided)when an application program is run on a terminal. The virtualenvironment may be a simulated environment of the real world, or may bea semi-simulated and semi-fictional three-dimensional environment, ormay be a purely fictitious three-dimensional environment. The virtualenvironment may be any one of a two-dimensional virtual environment, a2.5-dimensional virtual environment, and a three-dimensional virtualenvironment. In the following embodiments, descriptions are provided byusing an example in which the virtual environment is a three-dimensionalvirtual environment, but no limitation is set thereto. Optionally, thevirtual environment is further used for a battle between at least twovirtual characters in the virtual environment.

Optionally, the virtual environment is further used for a battle betweenat least two virtual characters using virtual guns. Optionally, thevirtual environment is further used for a battle between at least twovirtual characters using virtual guns within a target region, the targetregion continuously decreasing over time in the virtual environment.

Virtual object: It is a movable object in the virtual environment. Themovable object is at least one of a virtual character, a virtual animal,and an animation character. Optionally, when the virtual environment isa three-dimensional virtual environment, the virtual object is athree-dimensional model created based on an animation skeletontechnology. Each virtual object has a respective shape and size in thethree-dimensional virtual environment, and occupies some space in thethree-dimensional virtual environment.

Virtual gun: It is a virtual weapon that attacks by firing bullets inthe virtual environment. The virtual object may pick up the virtual gunin the virtual environment and attack by using the picked virtual gun.Optionally, each virtual gun may be provided with at least one slot forfitting at least one gun accessory. For example, an M416 automatic rifleis usually provided with a muzzle slot, a grip slot, a cartridge slot, abuttstock slot, and a scope slot. The scope slot may be fitted with anyone of a red dot scope, a holographic scope, a 2× scope, a 4× scope, andan 8× scope. When holding the M416 automatic rifle and opening a scope,a player may observe the virtual environment magnified to a specificextent according to the scope fitted on the gun.

Accessory slot: It is a slot for fitting a gun accessory when a virtualgun is used. Optionally, a type of the accessory slot includes at leastone of a muzzle accessory slot, a buttstock accessory slot, a scopeslot, and a cartridge slot. For example, if a gun accessory in theaccessory slot is a 4× scope, a gun accessory applied when the virtualgun is used is the 4× scope.

Gun accessories of the same type: Gun accessories are classified intodifferent types, for example, a grip type, a muzzle type, a scope type,and a buttstock type. Each type of the gun accessories is furtherclassified based on different models. For example, the grip typeincludes a vertical grip, an angle grip, a half grip, a light grip, anda thumb grip; the muzzle type includes a muzzle compensator, a flamedamper, and a silencer; and the scope type includes a red dot scope, aholographic scope, a 2× scope, a 4× scope, and an 8× scope. Optionally,gun accessories of the same type are displayed in accessory selectionboxes in an accessory display zone.

FIG. 1 is a structural block diagram of an electronic device accordingto an exemplary embodiment of this application. The electronic device100 includes an operating system 120 and an application program 122.

The operating system 120 is basic software that provides secure accessto computer hardware for the application program 122.

The application program 122 is an application program supporting avirtual environment. Optionally, the application program 122 is anapplication program supporting a three-dimensional virtual environment.The application program 122 may be any one of a VR application program,a three-dimensional map program, a military simulation program, a TPSgame, an FPS game, a MOBA game, and a multiplayer gunfight survivalgame. The application program 122 may be a stand-alone applicationprogram, for example, a stand-alone 3D game program.

FIG. 2 is a structural block diagram of a computer system according toan exemplary embodiment of this application. The computer system 200includes a first device 220, a server 240, and a second device 260.

An application program supporting a virtual environment is installed andrun in the first device 220. The application program may be any one of aVR application program, a three-dimensional map program, a militarysimulation program, a TPS game, an FPS game, a MOBA game, and amultiplayer gunfight survival game. The first device 220 is a deviceused by a first user. The first user controls, by using the first device220, a first virtual object in the virtual environment to move. Themovement includes, but is not limited to, at least one of the following:adjusting a body posture, crawling, walking, running, riding, jumping,driving, picking, shooting, attacking, and throwing. Schematically, thefirst virtual object is a first virtual character, for example, asimulated character or an animation character.

The first device 220 is connected to the server 240 through a wirelessnetwork or a wired network.

The server 240 includes at least one of one server, a plurality ofservers, a cloud computing platform, and a virtualization center. Theserver 240 is configured to provide a backend service for an applicationprogram supporting a three-dimensional virtual environment. Optionally,the server 240 is responsible for primary computing work, and the firstdevice 220 and the second device 260 are responsible for secondarycomputing work. Alternatively, the server 240 is responsible forsecondary computing work, and the first device 220 and the second device260 are responsible for primary computing work. Alternatively, theserver 240, the first device 220, and the second device 260 performcollaborative computing by using a distributed computing architecture.

An application program supporting a virtual environment is installed andrun in the second device 260. The application program may be any one ofthe VR application program, the three-dimensional map program, themilitary simulation program, the FPS game, the MOBA game, and themultiplayer gunfight survival game. The second device 260 is a deviceused by a second user. The second user controls, by using the seconddevice 260, a second virtual object in the virtual environment to move.The movement includes, but is not limited to, at least one of thefollowing: adjusting a body posture, crawling, walking, running, riding,jumping, driving, picking, shooting, attacking, and throwing.Schematically, the second virtual object is a second virtual character,for example, a simulated character or an animation character.

Optionally, the first virtual character and the second virtual characterare in the same virtual environment. Optionally, the first virtualcharacter and the second virtual character may belong to the same team,the same organization, have a friend relationship, or have temporarycommunication permission. Optionally, the first virtual character andthe second virtual character may alternatively belong to differentteams, different organizations, or two hostile groups.

Optionally, the application programs installed in the first device 220and the second device 260 are the same, or the application programsinstalled in the two devices are application programs of the same typeon different control system platforms. The first device 220 may refer toone of a plurality of devices. The second device 260 may refer to one ofa plurality of devices. In this embodiment, only the first device 220and the second device 260 are used as an example for description. Devicetypes of the first device 220 and the second device 260 are the same ordifferent. The device types include at least one of a game console, adesktop computer, a smartphone, a tablet computer, an e-book reader, amoving picture experts group audio layer III (MP3) player, a movingpicture experts group audio layer IV (MP4) player, and a portable laptopcomputer. In the following embodiments, descriptions are provided byusing an example in which the device is a desktop computer.

A person skilled in the art may know that there may be more or fewersuch device. For example, there may be only one such device, or theremay be dozens or hundreds such device, or more. The device quantity andthe device type are not limited in this embodiment of this application.

In the related art, which is described by using an example in which anaccessory slot is a scope slot, a virtual gun is provided with a primaryslot and a secondary slot. As shown in FIG. 3 , a backpack presentationinterface 31 includes a virtual gun 32 and a virtual gun 33. A scope 321is fitted in a primary slot of the virtual gun 32, and a scope 322 isfitted in a secondary slot of the virtual gun 32. A scope 331 is fittedin a primary slot of the virtual gun 33, and a scope 332 is fitted in asecondary slot of the virtual gun 33.

In a virtual battle, a user may click/tap an accessory switching controlin a first virtual environment interface to switch the scopes in theprimary slot and the secondary slot, to observe a virtual environment byusing the scope original in the secondary slot (the scope in the primaryslot after the switching). As shown in FIG. 4 , a gun status bar 411displayed in a first virtual environment interface 41 indicates that aprimary scope fitted on the virtual gun is a red dot scope. The firstvirtual environment interface 41 includes an accessory switching control412. After the user click/taps the accessory switching control 412, asecond virtual environment interface 42 is displayed. A gun status bar421 displayed in the second virtual environment interface 42 indicatesthat the primary scope fitted on the virtual gun is a 4× scope.

However, in this switching manner, the user can switch only between theprimary scope and the secondary scope, and cannot switch to anotherscope in a backpack. When switching a scope from the backpack to theprimary slot, the user needs to open the virtual backpack for fitting.It causes complex steps and inconvenient operations, resulting in lowhuman-computer interaction efficiency when the user switches betweenscopes.

A method for selecting an accessory in a virtual environment provided inthe embodiments of this application is described with reference to theforegoing term explanation. Referring to FIG. 5 , FIG. 5 is a flowchartof a method for selecting an accessory in a virtual environmentaccording to an exemplary embodiment of this application. Thisembodiment is described by using an example in which the method isapplied to a terminal. The method for selecting an accessory in avirtual environment includes the following steps:

Step 501: Display a first virtual environment interface.

Optionally, the first virtual environment interface includes a pictureof the virtual environment observed by a virtual object, an accessoryswitching control is displayed superimposed on the picture, and thevirtual object holds a virtual gun in the virtual environment.

Optionally, an application program is installed in the terminal. Theapplication program is an application program supporting the virtualenvironment. Optionally, the application program may be a VR applicationprogram, a TPS game, an FPS game, a MOBA game, or the like.

Optionally, the virtual gun held by the virtual object may be directlyobserved through the virtual object in the first virtual environmentinterface. For example, the virtual gun is held at a hand position ofthe virtual object, and a first accessory is displayed on the virtualgun. Moreover, the virtual gun may be observed in a gun status bardisplayed in the first virtual environment interface. For example, thevirtual gun is displayed in the gun status bar, and the first accessoryis correspondingly displayed together with the virtual gun.Alternatively, the virtual gun held by the virtual object cannot beobserved through the virtual object in the first virtual environmentinterface. For example, the virtual object and the virtual gun are notdisplayed in the first virtual environment interface, but the virtualgun may be observed in the gun status bar displayed in the first virtualenvironment interface. Alternatively, the virtual gun held by thevirtual object may be directly observed through the virtual object inthe first virtual environment interface, but the gun status bar is notdisplayed in the first virtual environment interface, and the virtualgun cannot be observed through the gun status bar. The observationmanner for the virtual gun is not limited in this embodiment of thisapplication.

Optionally, the first virtual environment interface is an interfacedisplayed from a first-person perspective of the virtual object, or maybe an interface displayed from a third-person perspective of the virtualobject. The first-person perspective is a perspective corresponding to apicture that the virtual object can observe in the virtual environment.An interface corresponding to the first-person perspective does notinclude the virtual object itself. For example, only arms of the virtualobject and the virtual gun can be seen. The third-person perspective isa perspective to observe the virtual object through a camera model inthe virtual environment. An interface corresponding to the third-personperspective includes the virtual object itself, and usually the cameramodel is located behind the virtual object to observe the virtualobject. For example, a three-dimensional model of the virtual object andthe virtual gun held by the virtual object can be seen.

Optionally, when the first virtual environment interface is displayedfrom the first-person perspective or the third-person perspective of thevirtual object, the first virtual environment interface further includesthe gun status bar. A first accessory fitted on the virtual gun isdisplayed in the gun status bar. The first-person perspective is used asan example. FIG. 6 is a schematic interface diagram of a first virtualenvironment interface 61 displayed in the first-person perspective ofthe virtual object. As shown in FIG. 6 , the first virtual environmentinterface 61 includes a gun status bar 62, and a first accessory “reddot” (that is, a red dot scope) fitted on the virtual gun is displayedin the gun status bar 62.

Optionally, when the first virtual environment interface is displayedfrom the first-person perspective or the third-person perspective of thevirtual object, the first virtual environment interface may furtherinclude a backpack control. A shortcut key operation may trigger abackpack to be opened, and a fitting status of the virtual gun isdisplayed in the backpack. As shown in FIG. 7 , a fitting status of avirtual gun 72 and a fitting status of a virtual gun 73 are displayed ina backpack 71 after the backpack is opened: a gun accessory 721 isfitted in a target slot of the virtual gun 72, and a gun accessory 731is fitted in a target slot of the virtual gun 73.

Optionally, when the first virtual environment interface is displayedfrom the third-person perspective of the virtual object, the firstvirtual environment interface further includes the virtual gun, and thefirst accessory that is fitted is displayed on the virtual gun.

Optionally, the first virtual environment interface further includes anaccessory switching control. As shown in FIG. 6 , the first virtualenvironment interface 61 further includes an accessory switching control63, and “red dot” is displayed on the accessory switching control 63,indicating that a scope fitted in a target slot of the virtual gun is ared dot scope.

Step 502: Receive a trigger operation on an accessory switching control.

Optionally, a manner of receiving a trigger operation includes either ofthe following manners:

1. receiving a click/tap operation on the accessory switching control;and

2. receiving a press operation on the accessory switching control.

Schematically, the trigger operation includes: click/tapping theaccessory switching control, pressing the accessory switching control,and performing continuous operations on the accessory switching control,the continuous operations being performing a click/tap operation andthen performing a press operation on the accessory switching control.

Step 503: Display a candidate accessory zone in a local peripheralregion of the accessory switching control according to the triggeroperation.

Optionally, n gun accessories of the same accessory type are displayedin the candidate accessory zone, the gun accessory is an accessory thathas been obtained by the virtual object and that is used for beingfitted on the virtual gun, and optionally, the gun accessory is fittedin a slot corresponding to the accessory type on the virtual gun, nbeing a positive integer.

Optionally, the local peripheral region is used for indicating that adistance between the accessory switching control and a point or a lineclosest to the accessory switching control in the candidate accessoryzone is less than a preset distance. Schematically, when the candidateaccessory zone is a sectorial area panel, an inner arc in the sectorialarea panel is closest to the accessory switching control. Therefore, ifa distance between the arc and the accessory switching control is lessthan the preset distance, the sectorial area panel is in the localperipheral region.

Optionally, when the candidate accessory zone is displayed in the localperipheral region of the accessory switching control according to thetrigger operation, a sectorial area panel may be displayed in the localperipheral region according to the trigger operation by using theaccessory switching control as a center. The sectorial area panelincludes m candidate boxes, and then gun accessories are displayed in nof the m candidate boxes, m≥n.

Optionally, the sectorial area panel may be on a left side of theaccessory switching control, a right side of the accessory switchingcontrol, an upper side of the accessory switching control, or a lowerside of the accessory switching control, or may be at any angle orposition of the accessory switching control. This is not limited in thisembodiment of this application.

Optionally, descriptions are provided by using an example in which thesectorial area panel is on the left side or the right side of theaccessory switching control. When the accessory switching control is ona right side of a display screen of the terminal, the sectorial areapanel is in a left local region of the accessory switching control, toavoid that when the sectorial area panel is displayed, a hand of a userblocks the sectorial area panel and a gun accessory displayed in thesectorial area panel cannot be determined, thereby helping the righthand of the user determine the gun accessory. Similarly, when theaccessory switching control is on a left side of the display screen ofthe terminal, the sectorial area panel is in a right local region of theaccessory switching control. When the accessory switching control is onan upper side of the display screen of the terminal, the sectorial areapanel is in an upper local region of the accessory switching control.When the accessory switching control is on a lower side of the displayscreen of the terminal, the sectorial area panel is in a lower localregion of the accessory switching control.

Schematically, referring to FIG. 8 , descriptions are provided by usingan example in which the sectorial area panel is on the left side of theaccessory switching control. A first virtual environment interface 81includes an accessory switching control 82. When a trigger operation onthe accessory switching control 82 is received, a sectorial area panel83 is displayed. The sectorial area panel includes seven candidateboxes, and three gun accessories are displayed in a candidate box 831, acandidate box 832, and a candidate box 833 (one gun accessory isdisplayed in each candidate box).

The foregoing description is provided by using an example in which thecandidate accessory zone is a sectorial area panel. In actual operation,the candidate accessory zone may alternatively be a rectangular areapanel, a circular area panel, a hexagonal area panel, or the like. Thisis not limited in this embodiment of this application.

Optionally, the gun accessories may be displayed in the candidateaccessory zone in any one of the following manners:

1. The candidate accessory zone sequentially displays the n gunaccessories according to how often the virtual object uses the gunaccessories.

Optionally, when a sectorial area panel is displayed in the candidateaccessory zone, the sectorial area panel includes at least one layer ofsectorial sub-area, and p gun accessories used most frequently aredisplayed in the first layer of sectorial sub-area, the first layer ofsectorial sub-area being a sectorial sub-area closest to the accessoryswitching control, and p≤n.

2. The candidate accessory zone sequentially displays the n gunaccessories according to fitting degrees between the virtual gun and thegun accessories.

Optionally, when a sectorial area panel is displayed in the candidateaccessory zone, the sectorial area panel includes at least one layer ofsectorial sub-area, and p gun accessories with the highest degree ofadaptation are displayed in the first layer of sectorial sub-area.

3. The candidate accessory zone displays the n gun accessories accordingto a preset display order.

Optionally, when a sectorial area panel is displayed in the candidateaccessory zone, the sectorial area panel includes at least one layer ofsectorial sub-area, and the first p gun accessories corresponding to thepreset display order are displayed in the first layer of sectorialsub-area.

Optionally, the preset display order may be a display order provided inthe application program, or may be a display order obtained after aplayer presets priorities of the gun accessories.

4. The candidate accessory zone sequentially displays the n gunaccessories according to an order of picking up the gun accessories bythe virtual object.

In the foregoing manners, when the n gun accessories are sequentiallydisplayed in the first layer of sectorial sub-area, the n gunaccessories may be sequentially displayed from top to bottom in thefirst layer of sectorial sub-area, or the n gun accessories may besequentially displayed from bottom to top in the first layer ofsectorial sub-area. Alternatively, the n gun accessories may besequentially displayed from a middle position to two sides in the firstlayer of sectorial sub-area. Schematically, descriptions are provided byusing an example in which five gun accessories are sequentiallydisplayed from a middle position to two sides in the first layer ofsectorial sub-area. The five gun accessories sequentially arranged arerespectively an accessory a, an accessory b, an accessory c, anaccessory d, and an accessory e. Five candidate boxes from top to bottomin the first layer of sectorial sub-area are respectively a candidatebox A, a candidate box B, a candidate box C, a candidate box D, and acandidate box E. Then, the accessory a is displayed in the candidate boxC, the accessory b is displayed in the candidate box B, the accessory cis displayed in the candidate box D, the accessory d is displayed in thecandidate box A, and the accessory e is displayed in the candidate boxE.

Step 504: Receive a selection operation on a target gun accessory in ngun

accessories.

Optionally, a manner of receiving a selection operation on a target gunaccessory includes either of the following manners:

1. receiving a click/tap operation on the target gun accessory; and

2. receiving, in a case that the trigger operation is a press operation,a drag operation following the press operation, a start position of thedrag operation being a first display position corresponding to theaccessory switching control, and an end position of the drag operationbeing a second display position corresponding to the target gunaccessory; and receiving a drag end operation at the second displayposition, and determining the drag end operation as the selectionoperation on the target gun accessory.

Optionally, each gun accessory corresponds to one accessory identifier,and the target gun accessory is fitted on the virtual gun according to atarget accessory identifier of the target gun accessory corresponding tothe selection operation.

Step 505: Replace the first virtual environment interface with a secondvirtual environment interface according to the selection operation.

Optionally, the second virtual environment interface includes a pictureof the virtual environment observed by the virtual object, the virtualobject holds the virtual gun, and the target gun accessory is fitted inthe target slot of the virtual gun.

Schematically, referring to FIG. 9 , a first virtual environmentinterface 91 includes an accessory switching control 92. When a pressoperation on the accessory switching control 92 is received (forexample, the user presses the accessory switching control 92 on thescreen by using a finger), a sectorial area panel 93 is displayed. Thesectorial area panel includes seven candidate boxes. A gun accessory isdisplayed in a candidate box 931. A drag operation following the pressoperation is received, a start position of the drag operation being afirst display position corresponding to the accessory switching control92, and an end position of the drag operation being a second displayposition corresponding to the candidate box 931. When a press endoperation on the candidate box 931 is received (for example, the userlifts the finger from the screen), the press end operation is determinedas a selection operation on a target gun accessory in the candidate box931, and the gun accessory displayed in the candidate box 931 is fittedon the virtual gun.

Briefly, the user moves the finger from the position of the accessoryswitching control 92 to the position of the candidate box 931 in thefirst virtual environment interface 91 and releases the pressing of thefinger on the screen, to fit the gun accessory displayed in thecandidate box 931.

In conclusion, in the method for selecting an accessory in a virtualenvironment provided in this embodiment of this application, theaccessory switching control is displayed in the first virtualenvironment interface. When the trigger operation on the accessoryswitching control is received, the candidate accessory zone is displayedin the peripheral region of the accessory switching control, and the ngun accessories of the same accessory type are displayed in thecandidate accessory zone. In this way, a user may select any one of then gun accessories to be fitted in the target slot without opening abackpack to select a to-be-selected accessory. Operation steps in theentire switching process are simple, and the human-computer interactionefficiency is relatively high when the user switches betweenaccessories.

In the method provided in this embodiment, when the trigger operation isa press operation and the selection operation is a drag operation, theaction performed when the user selects the target gun accessory may beconsidered as a drag operation from the position corresponding to theaccessory switching control to the position corresponding to the targetgun accessory, that is, the user selects the target gun accessorythrough a drag operation during operation. The selection process is moreconvenient and easier to operate.

In the method provided in this embodiment, the gun accessories aredisplayed through the sectorial area panel, and the gun accessory usedfrequently is displayed in the inner layer closest to the accessoryswitching control, facilitating switching to the gun accessory usedfrequently. When the terminal displays the first virtual environmentinterface in a landscape mode, the gun accessory used frequently isdisplayed in the inner layer closest to the accessory switching controlwhere the finger is located, so that the finger can easily select thegun accessory used frequently.

In the method provided in this embodiment, the gun accessories aredisplayed through the sectorial area panel, and the gun accessory with ahigh degree of adaptation is displayed in the inner layer closest to theaccessory switching control, facilitating switching to the gun accessorywith a high degree of adaptation. When the terminal displays the firstvirtual environment interface in a landscape mode, the gun accessorywith a high degree of adaptation is displayed in the inner layer closestto the accessory switching control where the finger is located, so thatthe finger can easily select the gun accessory with a high degree ofadaptation.

In an optional embodiment, the target slot is a slot for fitting ascope, and a first scope is fitted on the virtual gun in a process ofdisplaying the first virtual environment interface. Referring to FIG. 10, FIG. 10 is a flowchart of a method for selecting an accessory in avirtual environment according to another exemplary embodiment of thisapplication. This embodiment is described by using an example in whichthe method is applied to a terminal. The method for selecting anaccessory in a virtual environment includes the following steps:

Step 1001: Receive a scope opening operation.

Optionally, the scope opening operation is used for observing thevirtual environment by using a first scope in a target slot.

Step 1002: Display a first virtual environment interface according tothe scope opening operation.

Optionally, the first virtual environment interface includes the virtualenvironment displayed magnified at a magnification of the first scope bya virtual object.

Optionally, the first virtual environment interface includes a pictureof the virtual environment displayed magnified at the magnification ofthe first scope and observed by the virtual object, an accessoryswitching control is displayed superimposed on the picture, the virtualobject holds a virtual gun in the virtual environment, and the firstscope is fitted on the virtual gun.

Step 1003: Receive a trigger operation on an accessory switchingcontrol.

Step 1004: Display a candidate accessory zone in a local peripheralregion of the accessory switching control according to the triggeroperation.

Optionally, n gun accessories of the same accessory type are displayedin the candidate accessory zone, and the gun accessory is an accessorythat has been obtained by the virtual object and that is used for beingfitted in a slot corresponding to the accessory type on the virtual gun,n being a positive integer.

Optionally, when the candidate accessory zone is displayed in the localperipheral region of the accessory switching control according to thetrigger operation, a rectangular area panel may be displayed in theperipheral region of the accessory switching control according to thetrigger operation, and the n gun accessories are displayed in therectangular area panel.

Schematically, as shown in FIG. 11 , an accessory switching control 111is displayed in a first virtual environment interface 110. When atrigger operation on the accessory switching control 111 is received, arectangular area panel 112 is displayed, and three gun accessories aredisplayed in the rectangular area panel 112.

Step 1005: Receive a selection operation on a target gun accessory inngun accessories.

Optionally, when the trigger operation is a press operation, a dragoperation following the press operation is received, a start position ofthe drag operation being a first display position corresponding to theaccessory switching control, an end position of the drag operation beinga second display position corresponding to the target gun accessory; anda drag end operation at the second display position is received, and thedrag end operation is determined as the selection operation on thetarget gun accessory.

Step 1006: Replace the first virtual environment interface with a secondvirtual environment interface according to the selection operation.

Optionally, the second virtual environment interface includes thevirtual environment displayed at a magnification of a second scope.

Schematically, referring to FIG. 12 , a first virtual environmentinterface 121 includes a picture of the virtual environment observed byusing a red dot scope. An accessory switching control 122 is displayedin the first virtual environment interface 121. When a press operationon the accessory switching control 122 is received, a sectorial areapanel 123 is displayed. A drag operation following the press operationis received, an end position of the drag operation being a positioncorresponding to a candidate box 1231, and a press end operation isreceived. A 4× scope in the candidate box 1231 is used as a switched-toscope. A second virtual environment interface 124 is displayed. Thesecond virtual environment interface 124 includes a picture of thevirtual environment observed by using the 4× scope.

In conclusion, in the method provided in this embodiment, when thevirtual environment is observed by using a scope, a scope that has beenpicked up may be directly selected, and a virtual environment interfacecorresponding to the selected scope may be directly switched to. Thesteps to use the scope are simple, and the human-computer interactionefficiency is relatively high.

In an optional embodiment, the candidate accessory zone further includesan accessory removal control configured to remove the gun accessory inthe target slot of the virtual gun. Referring to FIG. 13 , FIG. 13 is aflowchart of a method for selecting an accessory in a virtualenvironment according to another exemplary embodiment of thisapplication. This embodiment is described by using an example in whichthe method is applied to a terminal. The method for selecting anaccessory in a virtual environment includes the following steps:

Step 1301: Display a first virtual environment interface.

Optionally, the first virtual environment interface includes a pictureof the virtual environment observed by a virtual object, an accessoryswitching control is displayed superimposed on the picture, and thevirtual object holds a virtual gun in the virtual environment.

Optionally, the first virtual environment interface may alternatively bea picture of the virtual environment observed by using a scope on thevirtual gun. For example, a target slot of the virtual gun is used forfitting a scope. A first scope is fitted on the virtual gun. Then, ascope opening operation is received. The scope opening operation is usedfor observing the virtual environment by using the first scope in thetarget slot. The first virtual environment interface is displayedaccording to the first scope. The first virtual environment interfaceincludes the virtual environment displayed magnified at a magnificationof the first scope.

Step 1302: Receive a trigger operation on an accessory switchingcontrol.

Optionally, a manner of receiving a trigger operation includes either ofthe following manners:

1. receiving a click/tap operation on the accessory switching control;and

2. receiving a press operation on the accessory switching control.

Step 1303: Display a candidate accessory zone in a local peripheralregion of the accessory switching control according to the triggeroperation.

Optionally, the candidate accessory zone includes an accessory removalcontrol.

Optionally, n gun accessories of the same accessory type are displayedin the candidate accessory zone, and the gun accessory is an accessorythat has been obtained by the virtual object and that is used for beingfitted in a slot corresponding to the accessory type on the virtual gun,n being a positive integer.

Step 1304: Receive a control selection operation on an accessory removalcontrol.

Optionally, a manner of receiving a control selection operation on anaccessory removal control includes either of the following manners:

1. receiving a click/tap operation on the accessory removal control; and

2. receiving, in a case that the trigger operation is a press operation,a drag operation following the press operation, a start position of thedrag operation being a first display position corresponding to theaccessory switching control, and an end position of the drag operationbeing a third display position corresponding to the accessory removalcontrol; and receiving a press end operation at the third displayposition, and determining the press end operation as the controlselection operation on the accessory removal control.

Schematically, when a press operation on the accessory switching controlis received (for example, a user presses the accessory switching controlon a screen by using a finger), a candidate accessory zone is displayed.The candidate accessory zone further includes an accessory removalcontrol. A drag operation following the press operation is received, astart position of the drag operation being a first display positioncorresponding to the accessory switching control, and an end position ofthe drag operation being a third display position corresponding to theaccessory removal control (that is, the user moves the finger from theposition corresponding to the accessory switching control to theposition corresponding to the accessory removal control). When a pressend operation on the accessory removal control is received (for example,the user lifts the finger from the screen), the press end operation isdetermined as a control selection operation on the accessory removalcontrol, and a gun accessory on the virtual gun is removed.

Step 1305: Replace the first virtual environment interface with a thirdvirtual environment interface according to the control selectionoperation.

Optionally, the third virtual environment interface includes a pictureof the virtual environment observed by the virtual object, the virtualobject holds the virtual gun, and no gun accessory is fitted in a targetslot of the virtual gun.

Optionally, when the first virtual environment interface includes apicture of the virtual environment observed by using a scope, the thirdvirtual environment interface includes a picture of the virtualenvironment observed by using a mechanical scope corresponding to thevirtual gun.

In conclusion, in the method provided in this embodiment, the accessoryremoval control is further displayed in the candidate accessory zone andthe accessory removal control is selected, the gun accessory on thevirtual gun may be directly removed without opening a backpack to removethe gun accessory. Operation steps in the entire removal process aresimple, and the human-computer interaction efficiency is relatively highwhen the user removes the gun accessory.

In the foregoing method, the accessory removal control and/or the targetgun accessory may be selected in two manners: a click/tap operation or adrag operation. Selection of the accessory removal control and/or thetarget gun accessory in the two manners is used for schematicdescriptions.

Optionally, the first virtual environment interface further includes acancel control. Referring to FIG. 14 and FIG. 15 , FIG. 14 is aflowchart of a method for selecting an accessory removal control and/ora target gun accessory through a drag operation. As shown in FIG. 14 ,the method includes the following steps:

Step 1401: Start a procedure.

Step 1402: Press an accessory switching control.

Step 1403: Display a candidate accessory zone.

Optionally, n gun accessories of the same accessory type are displayedin the candidate accessory zone. The gun accessory is an accessory thathas been obtained by the virtual object and that is used for beingfitted in a slot corresponding to the accessory type on a virtual gun,and n is a positive integer.

Optionally, when the candidate accessory zone is displayed in a localperipheral region of the accessory switching control according to atrigger operation, either of the following cases is included:

1. A sectorial area panel is displayed in the local peripheral regionaccording to the trigger operation by using the accessory switchingcontrol as a center, the sectorial area panel including m candidateboxes, and the n gun accessories are displayed in n of the m candidateboxes, m≥n.

2. A rectangular area panel is displayed in the peripheral region of theaccessory switching control according to the trigger operation, and then gun accessories are displayed in the rectangular area panel.

Optionally, the candidate accessory zone further includes an accessoryremoval control.

The candidate accessory zone is described by using the sectorial areapanel and the rectangular area panel as examples. In actual operation,the candidate accessory zone may alternatively be a circular area panel,a hexagonal area panel, or the like. This is not limited in thisembodiment of this application.

Step 1404: Receive a drag signal corresponding to a target gunaccessory.

That is, the drag signal is a signal triggered by a drag operation thatends on the target gun accessory.

Step 1405: End the press operation.

That is, the target gun accessory is selected.

Step 1406: Determine whether the target gun accessory is a gun accessorythat has been fitted.

Step 1407: Fit the target gun accessory on the virtual gun in a casethat the target gun accessory is not the gun accessory that has beenfitted, and cancel the displaying of the candidate accessory zone.

Step 1408: Retain the target gun accessory fitted on the virtual gununchanged in a case that the target gun accessory is the gun accessorythat has been fitted, and cancel the displaying of the candidateaccessory zone.

Step 1409: Receive a drag signal corresponding to an accessory removalcontrol.

That is, the drag signal is a signal triggered by a drag operation thatends on the accessory removal control.

Step 1410: End the press operation.

Step 1411: Remove a gun accessory in a target slot of the virtual gun,and cancel the displaying of the candidate accessory zone.

Step 1412: Receive a drag signal corresponding to a cancel control.

That is, the drag signal is a signal triggered by a drag operation thatends on the cancel control.

Step 1413: End the press operation.

Step 1414: Retain the target gun accessory fitted on the virtual gununchanged, and cancel the displaying of the candidate accessory zone.

Step 1415: End the procedure.

FIG. 15 is a flowchart of a method for selecting an accessory removalcontrol and/or a target gun accessory through a click/tap operation. Asshown in FIG. 15 , in the foregoing method flowchart shown in FIG. 14 ,step 1502 may be implemented in place of step 1402, step 1503 may beimplemented in place of step 1404 and step 1405, step 1504 may beimplemented in place of step 1409 and step 1410, and step 1505 may beimplemented in place of step 1412 and step 1413.

Step 1502: Click/tap an accessory switching control.

Step 1503: Click/tap a target gun accessory.

Step 1504: Click/tap an accessory removal control.

Step 1505: Click/tap a cancel control.

In conclusion, in the method for selecting an accessory in a virtualenvironment provided in this embodiment of this application, theaccessory switching control is displayed superimposed on the picture.When the trigger operation on the accessory switching control isreceived, the candidate accessory zone is displayed in the peripheralregion of the accessory switching control, and then gun accessories ofthe same accessory type are displayed in the candidate accessory zone.In this way, a user may select any one of the n gun accessories to befitted in the target slot without opening a backpack to select ato-be-selected accessory. The steps are simple, and the human-computerinteraction efficiency is relatively high when the user switches betweenaccessories.

FIG. 16 is a structural block diagram of an apparatus for selecting anaccessory in a virtual environment according to an exemplary embodimentof this application. Descriptions are provided by using an example inwhich the apparatus is applied to a terminal. As shown in FIG. 16 , theapparatus includes a display module 161 and a receiving module 162.

The display module 161 is configured to display a first virtualenvironment interface, the first virtual environment interface includinga picture of the virtual environment observed by a virtual object, anaccessory switching control being displayed superimposed on the picture,and the virtual object holding a virtual gun in the virtual environment.

The receiving module 162 is configured to receive a trigger operation onthe accessory switching control.

The display module 161 is further configured to display a candidateaccessory zone in a local peripheral region of the accessory switchingcontrol according to the trigger operation, n gun accessories of thesame accessory type being displayed in the candidate accessory zone, thegun accessory being an accessory that has been obtained by the virtualobject and that is used for being fitted on the virtual gun, the gunaccessory being fitted in a slot corresponding to the accessory type onthe virtual gun, and n being a positive integer.

The receiving module 162 is further configured to receive a selectionoperation on a target gun accessory in the n gun accessories.

The display module 161 is further configured to display a second virtualenvironment interface according to the selection operation, the secondvirtual environment interface including a picture of the virtualenvironment observed by the virtual object, the virtual object holdingthe virtual gun, and the target gun accessory being fitted in a targetslot of the virtual gun.

In an optional embodiment, the display module 161 is further configuredto display, according to the trigger operation, a sectorial area panelin the local peripheral region with the accessory switching control as acenter, the sectorial area panel including m candidate boxes, the n gunaccessories being displayed inn of the m candidate boxes, and m≥n.

In an optional embodiment, the receiving module 162 is furtherconfigured to receive a press operation on the accessory switchingcontrol.

The receiving module 162 is further configured to receive a dragoperation following the press operation, a start position of the dragoperation being a first display position corresponding to the accessoryswitching control, and an end position of the drag operation being asecond display position corresponding to the target gun accessory; andreceive a drag end operation at the second display position, anddetermine the drag end operation as the selection operation on thetarget gun accessory.

In an optional embodiment, the candidate accessory zone is used forsequentially displaying the n gun accessories according to how often thevirtual object uses the gun accessories;

or,

the candidate accessory zone is used for sequentially displaying the ngun accessories according to fitting degrees between the virtual gun andthe gun accessories;

or,

the candidate accessory zone is used for displaying the n gunaccessories according to a preset display order;

or,

the candidate accessory zone is used for sequentially displaying the ngun accessories according to an order of picking up the gun accessoriesby the virtual object.

In an optional embodiment, as shown in FIG. 17 , the display module 161further includes a receiving submodule 1611 and a display submodule1612.

The target slot is a slot for fitting a scope, a first scope is fittedin the target slot of the virtual gun in a process of displaying thefirst virtual environment interface, and the target gun accessory is asecond scope.

The receiving submodule 1611 is configured to receive a scope openingoperation, the scope opening operation being used for observing thevirtual environment by using the first scope in the target slot.

The display submodule 1612 is configured to display the first virtualenvironment interface according to the scope opening operation, thefirst virtual environment interface including the virtual environmentdisplayed magnified at a magnification of the first scope.

The display module 161 is further configured to display the secondvirtual environment interface according to the selection operation, thesecond virtual environment interface including the virtual environmentdisplayed magnified at a magnification of the second scope.

In an optional embodiment, the candidate accessory zone further includesan accessory removal control configured to remove the gun accessory inthe target slot.

The receiving module 162 is further configured to receive a controlselection operation on the accessory removal control.

The display module 161 is further configured to display a third virtualenvironment interface according to the control selection operation, thethird virtual environment interface including a picture of the virtualenvironment observed by the virtual object, the virtual object holdingthe virtual gun, and no gun accessory being fitted in the target slot ofthe virtual gun.

In an optional embodiment, the target slot is a slot for fitting ascope, and a first scope is fitted in the target slot of the virtual gunin a process of displaying the first virtual environment interface.

The receiving submodule 1611 is further configured to receive a scopeopening operation, the scope opening operation being used for observingthe virtual environment by using the first scope in the target slot.

The display submodule 1612 is further configured to display the firstvirtual environment interface according to the scope opening operation,the first virtual environment interface including the virtualenvironment displayed magnified at a magnification of the first scope.

The display module 161 is further configured to display the thirdvirtual environment interface according to the control selectionoperation, the third virtual environment interface including a pictureof the virtual environment observed by using a mechanical scopecorresponding to the virtual gun.

FIG. 18 is a structural block diagram of a terminal 1800 according to anexemplary embodiment of the present disclosure. The terminal 1800 may bea smartphone, a tablet computer, an MP3 player, an MP4 player, anotebook computer, or a desktop computer. The terminal 1800 may also bereferred to as another name such as user equipment, a portable terminal,a laptop terminal, a desktop terminal, or the like.

Generally, the terminal 1800 includes a processor 1801 and a memory1802.

The processor 1801 may include one or more processing cores, forexample, a 4-core processor, or an 8-core processor. The processor 1801may be implemented in at least one hardware form of a digital signalprocessor (DSP), a field-programmable gate array (FPGA), and aprogrammable logic array (PLA). The processor 1801 may also include amain processor and a coprocessor. The main processor is a processorconfigured to process data in an active state, and is also referred toas a central processing unit (CPU). The coprocessor is a low-powerprocessor configured to process data in a standby state. In someembodiments, the processor 1801 may be integrated with a graphicsprocessing unit (GPU). The GPU is configured to be responsible forrendering and drawing content that a display screen needs to display. Insome embodiments, the processor 1801 may further include an artificialintelligence (AI) processor. The AI processor is configured to process acomputing operation related to machine learning.

The memory 1802 may include one or more computer-readable storage media.The computer-readable storage medium may be non-transient. The memory1802 may further include a high-speed random access memory (RAM) and anon-volatile memory, for example, one or more magnetic disk storagedevices or flash memory devices. In some embodiments, the non-transitorycomputer-readable storage medium in the memory 1802 is configured tostore at least one instruction, and the at least one instruction is usedfor being executed by the processor 1801 to implement the method forselecting an accessory in a virtual environment provided in the methodembodiments of this application.

In some embodiments, the terminal 1800 further may optionally include aperipheral device interface 1803 and at least one peripheral device. Theprocessor 1801, the memory 1802, and the peripheral device interface1803 may be connected by using a bus or a signal cable. Each peripheraldevice may be connected to the peripheral device interface 1803 by usinga bus, a signal cable, or a circuit board. Specifically, the peripheraldevice includes at least one of a radio frequency (RF) circuit 1804, adisplay screen 1805, a camera component 1806, an audio circuit 1807, apositioning component 1808, and a power supply 1809.

The peripheral device interface 1803 may be configured to connect the atleast one peripheral device related to input/output (I/O) to theprocessor 1801 and the memory 1802. In some embodiments, the processor1801, the memory 1802, and the peripheral device interface 1803 areintegrated on the same chip or circuit board. In some other embodiments,any one or two of the processor 1801, the memory 1802, and theperipheral device interface 1803 may be implemented on a single chip orcircuit board. This is not limited in this embodiment.

The RF circuit 1804 is configured to receive and transmit an RF signal,which is also referred to as an electromagnetic signal. The RF circuit1804 communicates with a communication network and other communicationdevices by using the electromagnetic signal. The RF circuit 1804converts an electrical signal into an electromagnetic signal to betransmitted, or converts a received electromagnetic signal into anelectrical signal. Optionally, the RF circuit 1804 includes: an antennasystem, an RF transceiver, one or more amplifiers, a tuner, anoscillator, a DSP, a codec chipset, a subscriber identity module card,and the like. The RF circuit 1804 may communicate with other terminalsthrough at least one wireless communication protocol. The wirelesscommunication protocol includes, but is not limited to: World Wide Web,a metropolitan area network, an intranet, (2G, 3G, 4G, and 5G) mobilecommunication networks, a wireless local area network, and/or a wirelessfidelity (Wi-Fi) network. In some embodiments, the RF circuit 1804 mayalso include a circuit related to near field communication (NFC). Thisis not limited in this application.

The display screen 1805 is configured to display a UI. The UI mayinclude a graphic, a text, an icon, a video, and any combinationthereof. When the display screen 1805 is a touchscreen, the displayscreen 1805 also has a capability of collecting a touch signal on orabove a surface of the display screen 1805. The touch signal may beinput, as a control signal, to the processor 1801 for processing. Inthis case, the display screen 1805 may be further configured to providea virtual button and/or a virtual keyboard, which is also referred to asa soft button and/or a soft keyboard. In some embodiments, there may beone display screen 1805, disposed on a front panel of the terminal 1800.In some other embodiments, there may be at least two display screens1805, disposed on different surfaces of the terminal 1800 respectivelyor in a folded design. In some more embodiments, the display screen 1805may be a flexible display screen, disposed on a curved surface or afolded surface of the terminal 1800. Even, the display screen 1805 maybe further set in a non-rectangular irregular pattern, namely, aspecial-shaped screen. The display screen 1805 may be made of a materialsuch as a liquid crystal display (LCD) or an organic light-emittingdiode (OLED).

The camera component 1806 is configured to collect an image or a video.Optionally, the camera component 1806 includes a front-facing camera anda rear-facing camera. Generally, the front-facing camera is disposed onthe front panel of the terminal, and the rear-facing camera is disposedon a back surface of the terminal. In some embodiments, there are atleast two rear-facing cameras, each of which is any one of a maincamera, a depth of field camera, a wide-angle camera, and a long-focuscamera, so as to implement a background blurring function by fusing themain camera and the depth of field camera, and panoramic photographingand VR photographing functions or another fusion photographing functionby fusing the main camera and the wide-angle camera. In someembodiments, the camera component 1806 may further include a flash. Theflash may be a monochrome temperature flash, or may be a double colortemperature flash. The double color temperature flash refers to acombination of a warm light flash and a cold light flash, and may beused for light compensation under different color temperatures.

The audio circuit 1807 may include a microphone and a speaker. Themicrophone is configured to collect a sound wave of a user and anenvironment, and convert the sound wave into the electrical signal to beinput to the processor 1801 for processing, or to be input to the RFcircuit 1804 for implementing voice communication. For the purpose ofstereo collection or noise reduction, there may be a plurality ofmicrophones, disposed at different portions of the terminal 1800respectively. The microphone may be further an array microphone or anomni-directional collection type microphone. The speaker is configuredto convert an electrical signal from the processor 1801 or the RFcircuit 1804 into a sound wave. The speaker may be a conventional filmspeaker, or may be a piezoelectric ceramic speaker. When the speaker isthe piezoelectric ceramic speaker, not only the electrical signal can beconverted into a sound wave audible to a human being, but also theelectrical signal can be converted into a sound wave inaudible to thehuman being for ranging and the like. In some embodiments, the audiocircuit 1807 may alternatively include an earphone jack.

The positioning component 1808 is configured to position a currentgeographic location of the terminal 1800 for implementing navigation ora location based service (LBS). The positioning component 1808 may be apositioning component based on the global positioning system (GPS) ofthe United States, the Beidou system of China, or the Galileo system ofRussia.

The power supply 1809 is configured to supply power for variouscomponents in the terminal 1800. The power supply 1809 may be analternating current, a direct current, a disposable battery, or arechargeable battery. When the power supply 1809 includes therechargeable battery, the rechargeable battery may be a wiredrechargeable battery or a wireless rechargeable battery. The wiredrechargeable battery is a battery charged through a wired line. Thewireless rechargeable battery is a battery charged through a wirelesscoil. The rechargeable battery may be further configured to support afast charge technology.

In some embodiments, the terminal 1800 further includes one or moresensors 1810. The one or more sensors 1810 include, but are not limitedto, an acceleration sensor 1811, a gyroscope sensor 1812, a pressuresensor 1813, a fingerprint sensor 1814, an optical sensor 1815, and aproximity sensor 1816.

The acceleration sensor 1811 may detect the magnitude of acceleration onthree coordinate axes of a coordinate system established based on theterminal 1800. For example, the acceleration sensor 1811 may beconfigured to detect components of gravity acceleration on the threecoordinate axes. The processor 1801 may control, according to a gravityacceleration signal collected by the acceleration sensor 1811, thedisplay screen 1805 to display the UI in a transverse view or alongitudinal view. The acceleration sensor 1811 may be furtherconfigured to collect motion data of a game or a user.

The gyroscope sensor 1812 may detect a body direction and a rotationangle of the terminal 1800. The gyroscope sensor 1812 may cooperate withthe acceleration sensor 1811 to collect a 3D action by the user on theterminal 1800. The processor 1801 may implement the following functionsaccording to the data collected by the gyroscope sensor 1812: motionsensing (such as changing the UI according to a tilt operation of theuser), image stabilization during photographing, game control, andinertial navigation.

The pressure sensor 1813 may be disposed at a side frame of the terminal1800 and/or a lower layer of the display screen 1805. When the pressuresensor 1813 is disposed at the side frame of the terminal 1800, aholding signal of the user on the terminal 1800 may be detected, and theprocessor 1801 performs left/right hand identification or a quickoperation according to the holding signal collected by the pressuresensor 1813. When the pressure sensor 1813 is disposed at the lowerlayer of the display screen 1805, the processor 1801 controls anoperable control on the UI interface according to a pressure operationof the user on the display screen 1805. The operable control includes atleast one of a button control, a scroll-bar control, an icon control anda menu control.

The fingerprint sensor 1814 is configured to collect a user'sfingerprint, and the processor 1801 identifies a user's identityaccording to the fingerprint collected by the fingerprint sensor 1814,or the fingerprint sensor 1814 identifies the user's identity accordingto the collected fingerprint. When identifying that the user's identityis a trusted identity, the processor 1801 authorizes the user to performrelated sensitive operations. The sensitive operations include:unlocking the screen, viewing encrypted information, downloadingsoftware, paying, changing a setting, and the like. The fingerprintsensor 1814 may be disposed on a front, back, or side surface of theterminal 1800. When a physical button or a vendor logo is disposed onthe terminal 1800, the fingerprint sensor 1814 may be integrated withthe physical button or the vendor logo.

The optical sensor 1815 is configured to collect ambient lightintensity. In an embodiment, the processor 1801 may control displaybrightness of the display screen 1805 according to the ambient lightintensity collected by the optical sensor 1815. Specifically, when theambient light intensity is relatively high, the display brightness ofthe display screen 1805 is turned up. When the ambient light intensityis relatively low, the display brightness of the display screen 1805 isturned down. In another embodiment, the processor 1801 may furtherdynamically adjust a photographing parameter of the camera component1806 according to the ambient light intensity collected by the opticalsensor 1815.

The proximity sensor 1816, also referred to as a distance sensor, isgenerally disposed on the front panel of the terminal 1800. Theproximity sensor 1816 is configured to collect a distance between theuser and the front surface of the terminal 1800. In an embodiment, whenthe proximity sensor 1816 detects that the distance between the user andthe front surface of the terminal 1800 gradually becomes smaller, thedisplay screen 1805 is controlled by the processor 1801 to switch from ascreen-on state to a screen-off state. When the proximity sensor 1816detects that the distance between the user and the front surface of theterminal 1800 gradually becomes larger, the display screen 1805 iscontrolled by the processor 1801 to switch from the screen-off state tothe screen-on state.

A person skilled in the art may understand that a structure shown inFIG. 18 constitutes no limitation on the terminal 1800, and the terminalmay include more or fewer components than those shown in the figure, orsome components may be combined, or a different component deployment maybe used.

A person of ordinary skill in the art may understand that all or some ofthe steps of the methods in the embodiments may be implemented by aprogram instructing relevant hardware. The program may be stored in anon-transitory computer-readable storage medium. The computer-readablestorage medium may be a computer-readable storage medium included in thememory in the foregoing embodiments, or may be a computer-readablestorage medium that exists alone and is not fitted into a terminal. Thecomputer-readable storage medium stores at least one instruction, atleast one program, a code set or an instruction set, the at least oneinstruction, the at least one program, the code set or the instructionset being loaded and executed by the processor to implement the methodfor selecting an accessory in a virtual environment according to any oneof FIG. 5 , FIG. 10 , and FIG. 13 to FIG. 15 .

Optionally, the computer-readable storage medium may include: aread-only memory (ROM), a RAM, a solid state drive (SSD), an opticaldisc, or the like. The random access memory may include a resistancerandom access memory (ReRAM) and a dynamic random access memory (DRAM).The sequence numbers of the foregoing embodiments of this applicationare merely for description purpose but do not indicate the preference ofthe embodiments.

A person of ordinary skill in the art may understand that all or some ofthe steps of the foregoing embodiments may be implemented by usinghardware, or may be implemented by a program instructing relevanthardware. The program may be stored in a non-transitorycomputer-readable storage medium. The storage medium may be a ROM, amagnetic disk, an optical disc, or the like. The foregoing descriptionsare merely exemplary embodiments of this application, but are notintended to limit this application. Any modification, equivalentreplacement, or improvement made within the spirit and principle of thisapplication shall fall within the protection scope of this application.

What is claimed is:
 1. A method for selecting an equipment in a virtualenvironment, performed by a computer device having a processor andmemory storing a plurality of programs to be executed by the processor,the method comprising: displaying a first virtual environment interfaceof a virtual object, the first virtual environment interface includingan equipment switching control; in response to a trigger operation onthe equipment switching control: displaying a candidate equipment zoneadjacent the equipment switching control, the candidate equipment zoneincluding multiple pieces of equipment; receiving a selection operationon a target equipment from the multiple pieces of equipment by a user ofthe computer device, the selection operation dragging the equipmentswitching control to the target equipment in the candidate accessoryzone; and equipping the target equipment onto the virtual object.
 2. Themethod according to claim 1, wherein the displaying a candidateequipment zone adjacent the equipment switching control, the candidateequipment zone including multiple pieces of equipment comprises:displaying a sectorial area panel in the local peripheral region withthe equipment switching control at a center, the sectorial area panelcomprising multiple candidate boxes, each equipment being displayed in arespective one of the multiple candidate boxes.
 3. The method accordingto claim 2, wherein the candidate equipment zone displays the multiplepieces of equipment according to one selected from the group consistingof how often the virtual object uses the multiple pieces of equipment;fitting degrees between the virtual object and the multiple pieces ofequipment; a preset display order; and an order of picking up themultiple pieces of equipment by the virtual object.
 4. The methodaccording to claim 1, wherein the receiving a selection operation on atarget equipment from the multiple pieces of equipment by a user of thecomputer device comprises: receiving a press operation on the equipmentswitching control by the user of the computer device; receiving a dragoperation following the press operation, the drag operation including astart position on the equipment switching control and an end position onone of the multiple pieces of equipment in the candidate equipment zone;and determining the one of the multiple pieces of equipment in thecandidate equipment zone at the end position as the target equipmentupon receiving a drag end operation at the end position.
 5. The methodaccording to claim 1, wherein the displaying a first virtual environmentinterface of a virtual object further comprises: in response to a scopeopening operation, displaying the first virtual environment interfaceaccording to the scope opening operation, the first virtual environmentinterface comprising the virtual environment magnified at a firstmagnification level; and the equipping the target equipment onto thevirtual object comprises: replacing the first virtual environmentinterface with a second virtual environment interface according to theselection operation, the second virtual environment interface comprisingthe virtual environment magnified at a second magnification leveldifferent from the first magnification level.
 6. The method according toclaim 1, wherein the method further comprises: receiving a controlselection operation on an equipment removal control in the candidateequipment zone; and replacing the first virtual environment interfacewith a third virtual environment interface according to the controlselection operation, the third virtual environment interface comprisinga picture of the virtual environment in which the virtual object has noequipment.
 7. A terminal, comprising a processor and a memory, thememory storing a plurality of programs that, when executed by theprocessor, cause the terminal to perform a method for selecting anequipment in a virtual environment including: displaying a first virtualenvironment interface of a virtual object, the first virtual environmentinterface including an equipment switching control; in response to atrigger operation on the equipment switching control: displaying acandidate equipment zone adjacent the equipment switching control, thecandidate equipment zone including multiple pieces of equipment;receiving a selection operation on a target equipment from the multiplepieces of equipment by a user of the computer device, the selectionoperation dragging the equipment switching control to the targetequipment in the candidate accessory zone; and equipping the targetequipment onto the virtual object.
 8. The terminal according to claim 7,wherein the displaying a candidate equipment zone adjacent the equipmentswitching control, the candidate equipment zone including multiplepieces of equipment comprises: displaying a sectorial area panel in thelocal peripheral region with the equipment switching control at acenter, the sectorial area panel comprising multiple candidate boxes,each equipment being displayed in a respective one of the multiplecandidate boxes.
 9. The terminal according to claim 8, wherein thecandidate equipment zone displays the multiple pieces of equipmentaccording to one selected from the group consisting of how often thevirtual object uses the multiple pieces of equipment; fitting degreesbetween the virtual object and the multiple pieces of equipment; apreset display order; and an order of picking up the multiple pieces ofequipment by the virtual object.
 10. The terminal according to claim 7,wherein the receiving a selection operation on a target equipment fromthe multiple pieces of equipment by a user of the computer devicecomprises: receiving a press operation on the equipment switchingcontrol by the user of the computer device; receiving a drag operationfollowing the press operation, the drag operation including a startposition on the equipment switching control and an end position on oneof the multiple pieces of equipment in the candidate equipment zone; anddetermining the one of the multiple pieces of equipment in the candidateequipment zone at the end position as the target equipment uponreceiving a drag end operation at the end position.
 11. The terminalaccording to claim 7, wherein the displaying a first virtual environmentinterface of a virtual object further comprises: in response to a scopeopening operation, displaying the first virtual environment interfaceaccording to the scope opening operation, the first virtual environmentinterface comprising the virtual environment magnified at a firstmagnification level; and the equipping the target equipment onto thevirtual object comprises: replacing the first virtual environmentinterface with a second virtual environment interface according to theselection operation, the second virtual environment interface comprisingthe virtual environment magnified at a second magnification leveldifferent from the first magnification level.
 12. The terminal accordingto claim 7, wherein the method further comprises: receiving a controlselection operation on an equipment removal control in the candidateequipment zone; and replacing the first virtual environment interfacewith a third virtual environment interface according to the controlselection operation, the third virtual environment interface comprisinga picture of the virtual environment in which the virtual object has noequipment.
 13. A non-transitory computer-readable storage medium,storing a plurality of programs that, when executed by a processor of aterminal, cause the terminal to perform a method for selecting anequipment in a virtual environment including: displaying a first virtualenvironment interface of a virtual object, the first virtual environmentinterface including an equipment switching control; in response to atrigger operation on the equipment switching control: displaying acandidate equipment zone adjacent the equipment switching control, thecandidate equipment zone including multiple pieces of equipment;receiving a selection operation on a target equipment from the multiplepieces of equipment by a user of the computer device, the selectionoperation dragging the equipment switching control to the targetequipment in the candidate accessory zone; and equipping the targetequipment onto the virtual object.
 14. The non-transitorycomputer-readable storage medium according to claim 13, wherein thedisplaying a candidate equipment zone adjacent the equipment switchingcontrol, the candidate equipment zone including multiple pieces ofequipment comprises: displaying a sectorial area panel in the localperipheral region with the equipment switching control at a center, thesectorial area panel comprising multiple candidate boxes, each equipmentbeing displayed in a respective one of the multiple candidate boxes. 15.The non-transitory computer-readable storage medium according to claim14, wherein the candidate equipment zone displays the multiple pieces ofequipment according to one selected from the group consisting of howoften the virtual object uses the multiple pieces of equipment; fittingdegrees between the virtual object and the multiple pieces of equipment;a preset display order; and an order of picking up the multiple piecesof equipment by the virtual object.
 16. The non-transitorycomputer-readable storage medium according to claim 13, wherein thereceiving a selection operation on a target equipment from the multiplepieces of equipment by a user of the computer device comprises:receiving a press operation on the equipment switching control by theuser of the computer device; receiving a drag operation following thepress operation, the drag operation including a start position on theequipment switching control and an end position on one of the multiplepieces of equipment in the candidate equipment zone; and determining theone of the multiple pieces of equipment in the candidate equipment zoneat the end position as the target equipment upon receiving a drag endoperation at the end position.
 17. The non-transitory computer-readablestorage medium according to claim 13, wherein the displaying a firstvirtual environment interface of a virtual object further comprises: inresponse to a scope opening operation, displaying the first virtualenvironment interface according to the scope opening operation, thefirst virtual environment interface comprising the virtual environmentmagnified at a first magnification level; and the equipping the targetequipment onto the virtual object comprises: replacing the first virtualenvironment interface with a second virtual environment interfaceaccording to the selection operation, the second virtual environmentinterface comprising the virtual environment magnified at a secondmagnification level different from the first magnification level. 18.The non-transitory computer-readable storage medium according to claim13, wherein the method further comprises: receiving a control selectionoperation on an equipment removal control in the candidate equipmentzone; and replacing the first virtual environment interface with a thirdvirtual environment interface according to the control selectionoperation, the third virtual environment interface comprising a pictureof the virtual environment in which the virtual object has no equipment.